#include <cstdio>
#include <cstring>
#include <algorithm>
#define _clr(x,a) memset(x,a,sizeof(x))
using namespace std;
const int N=10050;
int n,m;
int c[N];
double v[N];
double dp[N];
int main(void){
    while(~scanf("%d%d",&n,&m) && (n || m)){
        _clr(c,0);
        _clr(v,0.0);
        for(int i=0;i<=n;i++){
            dp[i]=1.0;
        }
        for(int i=0;i<m;i++){
            scanf("%d%lf",&c[i],&v[i]);
        }
        //一维数组的背包一定要从后面遍历
        for(int i=0;i<m;i++){
            for(int j=n;j>=c[i];j--){
                dp[j]=min(dp[j],dp[j-c[i]]*(1-v[i]));
            }
        }
        printf("%.1lf%%\n",(1-dp[n])*100);
    }
    return 0;
}
